﻿#include <QCoreApplication>

#include "chatroom.h"
#include "commonmember.h"
#include "diamondmember.h"

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    ChatRoom* chartRoom = new ChatRoom();

    CommonMember* commonMember = new CommonMember(1);
    chartRoom->registerMember(1, commonMember);

    DiamondMember* diamendMember = new DiamondMember(2);
    chartRoom->registerMember(2, diamendMember);

    commonMember->sendImage(2, "image");
    commonMember->sendText(2, "text");

    diamendMember->sendImage(1, "image");
    diamendMember->sendText(1, "text");

    delete diamendMember;
    delete commonMember;
    delete chartRoom;

    return a.exec();
}
